package com.sky.controller.subAccount;

import com.sky.result.Result;
import com.sky.service.StockService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author : RemSynch
 * @Date: 2024/11/6 上午9:55
 * @Description:
 */
@RestController
@RequestMapping("/stock")
@Api(tags = "前台查询正股")
public class StockMirrorController {
    @Autowired
    private StockService stockService;

    @GetMapping
    public Result list() {
        return Result.success(stockService.list());
    }

    @GetMapping("/{id}")
    public Result get(@PathVariable Long id) {
        return Result.success(stockService.getById(id));
    }
}
